package Demo7;

import java.io.*;
//字符流
public class BufferedReaderTest1 {
    public static void main(String[] args) {
        Reader reader = null;
        BufferedReader br = null;
        try {
            reader = new FileReader("f:/Test/a.txt");
            br = new BufferedReader(reader);
            String s;
            while ((s = br.readLine())!=null){
                System.out.println(s);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                br.close();
                reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
